package cn.monkey.family.data.dict;

import org.springframework.data.domain.Sort;
import org.springframework.data.repository.NoRepositoryBean;

import java.util.List;
import java.util.Optional;

@NoRepositoryBean
public interface DictRepository<T extends Dict> {

    List<T> selectAll(Sort sort);

    default List<T> selectAll() {
        return this.selectAll(Sort.unsorted());
    }

    Optional<T> selectByKey(String key);
}
